import { createRouter, createWebHistory } from "vue-router";
import Layout from "../views/layout.vue";
import Login from "../views/login.vue";
import Summarize from "../views/review/Summarize.vue";
import activity from "../views/action/activity.vue";
import team from "../views/review/team.vue";
import upload from "../views/material/upload.vue";
import Teammanage from "../views/manage/Teammanage.vue";
import TeamDetail from '../views/manage/TeamDetail.vue'

const routes = [
  {path: '/login', component: Login},  // 一级路由
  {
    path: '/',
    redirect: '/login',  // 重定向
    component: Layout,
    // 子路由
    children: [
      {path: '/manage/Teammanage', name:Teammanage,component:Teammanage},
      {
        path: '/team-detail/:id',
        name: 'TeamDetail',
        component: TeamDetail,
        props: true
      } ,
      {path: '/review/Summarize', name: 'Summarize', component: Summarize},
      {path: 'review/team', component: team},
      {path: 'material/upload', component: upload},
      {path: '/action/activity', component: activity},
    ]
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes
});



export default router;